var showVerifyDiv=false;
function getVerify(){
    var userAccount=$("#txtLoginEMail").val();
    $.getJSON("http://my.baihe.com/Getinterlogin/getAccountTimes?jsonCallBack=?&userAccount="+userAccount,
        function(msg){
            if(msg.data['showCode']!=undefined&&msg.data['showCode']==true){
                showVerify();
                showVerifyDiv=true;
            }
        });    
}
function showVerify(){
    var tmpid=parseInt(new Date().getTime() + Math.random() * 10000);
    $("#tmpid").val(tmpid);
    $("#verfyRe").attr("href","javascript:showVerify();");
    $("#codeImg").attr("src", "http://my.baihe.com/Getinterlogin/getVerifyPic?jsonCallBack=?&tmpId="+tmpid); 
    $("#verifyDiv").css("display","block");  
}

function checkVerify(tmpid,code){
    $.getJSON("http://my.baihe.com/Getinterlogin/checkVerifyPic?jsonCallBack=?&tmpId="+tmpid+"&checkcode="+code,
        function(msg){
            if(msg.state==1&&msg.data==1){
                $("#verifyErr").hide();
                return true;
            }else{
                $("#verifyErr").show();
				$('#code').val('');
                return false;
            }
        });  
}
var showVerifyDivRegist=false;
var isBlackIP=false;
function getVerifyRegist(){
    $.getJSON("http://my.baihe.com/Getinterregist/getIPTimes?jsonCallBack=?",
        function(msg){
            if(msg.data['isBlackIP']!=undefined&&msg.data['isBlackIP']==1){
                showVerifyDivRegist=false;
            }
            if(msg.data['isBlackIP']!=undefined&&msg.data['isBlackIP']==2){              
                showVerifyDivRegist=true;
                isBlackIP=true;
                alert("您的IP存在风险无法注册！");
                return false;
            }
            if(msg.data['showCode']!=undefined&&msg.data['showCode']==true){
                showVerify();
                showVerifyDivRegist=true;
            }
        });    
}